# -*- coding: utf-8 -*- 
# 作者:飞虎
# 开发时间:2022/6/1 21:29
from PyQt5.Qt import *


class Window(QMainWindow):
	def __init__(self):
		super().__init__()
		self.setWindowTitle('QDockWidget学习')
		self.resize(500, 500)
		self.setup_ui()

	def setup_ui(self):
		self.items=QDockWidget('Dockable',self)
		self.listWidget = QListWidget()
		self.listWidget.addItem('item1')
		self.listWidget.addItem('item2')
		self.listWidget.addItem('item3')

		self.items.setWidget(self.listWidget)
		self.setCentralWidget(QLineEdit())
		# self.items.setFloating(True)

		self.addDockWidget(Qt.RightDockWidgetArea,self.items)
		# self.addDockWidget(Qt.LeftDockWidgetArea,self.items)
		# self.addDockWidget(Qt.TopDockWidgetArea,self.items)
		# self.addDockWidget(Qt.BottomDockWidgetArea,self.items)
		# Qt.DockWidgetArea

		QTableWidget
		QTableWidgetItem


if __name__ == '__main__':
	import sys

	app = QApplication(sys.argv)
	window = Window()
	window.show()
	sys.exit(app.exec_())